# !usr/bin/env python
# -*- coding:utf-8 _*-
"""
@Author:张广勤
@Web site: https://www.tunan.wang
@Github:www.github.com
 
@File:myApp_gongbao.py
@Time:2024/9/11 17:45

@Motto:不积跬步无以至千里，不积小流无以成江海！
"""

import streamlit as st
import pandas as pd

from gongbao_quanguo.bianli_quanguo_gongbao import display,input_keywords,extract_paragraphs_with_keywords,folder_path


df = pd.DataFrame({
  'first column': ['全国统计公报', '统计公报关键字查找'],
  'second column': [15, 16]
})

# df
option = st.sidebar.selectbox(
    'Which number do you like best?',
     df['first column'])

'You selected:', option


if option == '全国统计公报':
    display()

if option == '统计公报关键字查找':
    keywords = input_keywords()
    extract_paragraphs_with_keywords(folder_path, keywords)

